/*
 * net_constant.h
 *
 *  Created on: 2014-4-25
 *      Author: Kise
 */

#ifndef NET_CONSTANT_H_
#define NET_CONSTANT_H_

#include <pthread.h>

#define CPU_YIELD_NS (20 * 1000)

#define release_mutex_t(lock) {while(pthread_mutex_destroy(&(lock)) == EBUSY)\
	usleep(CPU_YIELD_NS);}

#define release_rwlock(lock) {while(pthread_rwlock_destroy(&(lock)) == EBUSY) \
	usleep(CPU_YIELD_NS);}

#endif /* NET_CONSTANT_H_ */
